package android.mcsmtms.domain;

import java.io.Serializable;
import java.util.Date;


import android.mcsmtms.constant.GlobalConstants;
import android.mcsmtms.util.Utilities;

public class MobileUserReport implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7484006402604456127L;

	private Integer id;
	//private String situationReportId;

	private Integer reporter;
	
	private Date reportDateTime;
	
	private String reportDateTimeString;
	
	private String road;
		
	private String situation;
	
	private String trafficCondition;
	
	private String description;
	
	private Double locationLat;
	
	private Double locationLng;
	
	private Double speed;
	
	private User user;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getRoad() {
		return road;
	}

	public void setRoad(String road) {
		this.road = road;
	}

	public Integer getReporter() {
		return reporter;
	}

	public void setReporter(Integer reporter) {
		this.reporter = reporter;
	}

	public void setReportDateTime(Date reportDateTime) {
		this.reportDateTime = reportDateTime;
	}
	
//	public void setReportDateTime(Date reportDateTime) {
//		this.reportDateTime = reportDateTime;
//	}
	
	public Date getReportDateTime() {
		return reportDateTime;
	}
	//return Utils.formatDefaultDate(lastUpdateDateTime);
	
	public void setReportDateTimeString(String reportDateTimeString) {
		this.reportDateTimeString = reportDateTimeString;
	}
	
	public String getReportDateTimeString() {
		return reportDateTimeString;
	}

	public String getSituation() {
		return situation;
	}

	public void setSituation(String situation) {
		this.situation = situation;
	}

	public String getTrafficCondition() {
		return trafficCondition;
	}

	public void setTrafficCondition(String trafficCondition) {
		this.trafficCondition = trafficCondition;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Double getLocationLat() {
		return locationLat;
	}

	public void setLocationLat(Double locationLat) {
		this.locationLat = locationLat;
	}

	public Double getLocationLng() {
		return locationLng;
	}

	public void setLocationLng(Double locationLng) {
		this.locationLng = locationLng;
	}

	public Double getSpeed() {
		return speed;
	}

	public void setSpeed(Double speed) {
		this.speed = speed;
	}
	
	public String getTrafficConditionDesc() {
		if (trafficCondition != null && !"".equals(trafficCondition)) {
			return GlobalConstants.TrafficConditionTypes
					.getDescriptionByCode(trafficCondition);
		}
		return null;
	}

	public String getRoadDesc() {
		if (road != null && !"".equals(road)) {
			return GlobalConstants.Roads.getDescriptionByCode(road);
		}
		return null;
	}
	
	public String getSituationDesc() {
		// return situationDescription;
		if (situation != null && !"".equals(situation)) {
			return GlobalConstants.SituationTypes
					.getDescriptionByCode(situation);
		}
		return null;
	}
	
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

}
